#include <stdio.h>
#include <stdlib.h>

// test1 for #
#define PSQR( x ) printf( "the square of " # x " is %d.\n", (x) * (x))

// test2 for ##
#define XNAME( n ) x ## n
#define PXN( n ) printf( "x" # n " = %d\n", x ## n )

// test3 for __VA_ARGS__
#define PR(... ) printf( __VA_ARGS__ )

int main( int argc, char *argv[] )
{
	// test1
	int y = 4;

	PSQR( y );
	PSQR( 2 + 4 );

	// test2
	int XNAME( 1 ) = 12; // int x1=12;
	PXN( 1 ); // printf("x1 = %d\n", x1);

	// test3
	int a = 10;
	float b = 1.2;

	PR( "Hello\n" );
	PR( "a = %d, b = %.2f\n", a, b );

	return 0;
}
